package singleton;

import java.util.Date;

public class BasicLazySingleton {
	
	private Date date;
	private static BasicLazySingleton ekniranjan;

	public static BasicLazySingleton getInstance() {
		synchronized(BasicLazySingleton.class) {
			if (ekniranjan == null) {
				ekniranjan = new BasicLazySingleton();
			}	
		}
	
		return ekniranjan;
	}
	
	private BasicLazySingleton() {
		this.date = new Date();
	}
	
	public void printData() {
		System.out.println("\nCreated at: " + date.toString());
	}

}
